home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5216 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  829 b 

  1. Path: news1.cle.ab.com!usenet
  2. From: don.phillips@ab.com (Donald-Anthony C. Phillips)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: new C programmer needs help with quicksort
  5. Date: Thu, 08 Feb 1996 22:13:03 GMT
  6. Organization: The Allen-Bradley Co., Inc
  7. Distribution: inet
  8. Message-ID: <4fdhvu$54k@news1.cle.ab.com>
  9. References: <4fbvrd$i6p@sifon.cc.mcgill.ca>
  10. NNTP-Posting-Host: abpc386.cle.ab.com
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. Your recursive call is reallocating a new instance of the aux array by
  14. declaring 'int aux[3]' each time in quicksort.  Try putting the aux as
  15. a global variable in the main procedure.  This should at least give
  16. you the same aux[] data throughout. 
  17. Donald-Anthony C. Phillips
  18. Programmer/Analyst
  19.  Rockwell  Automation
  20.        ---------------------------------------
  21.         Allen-Bradley
  22. don.phillips@ab.com
  23.  
  24.